package com.example.demo.model;/*
 * Copyright © 2020-2035 erupt.xyz All rights reserved.
 * Author: YuePeng (erupts@126.com)
 */

import javax.persistence.*;
import xyz.erupt.annotation.*;
import xyz.erupt.annotation.sub_erupt.*;
import xyz.erupt.annotation.sub_field.*;
import xyz.erupt.annotation.sub_field.sub_edit.*;
import xyz.erupt.upms.model.base.HyperModel;
import xyz.erupt.jpa.model.BaseModel;
import java.util.Set;
import java.util.Date;

@Erupt(name = "图书")
@Table(name = "book")
@Entity
public class Book extends BaseModel {

        @EruptField(
                views = @View(
                        title = "图书编码"
                ),
                edit = @Edit(
                        title = "图书编码",
                        type = EditType.INPUT, search = @Search, notNull = true,
                        inputType = @InputType
                )
        )
        private String book_id;

        @EruptField(
                views = @View(
                        title = "图书名称"
                ),
                edit = @Edit(
                        title = "图书名称",
                        type = EditType.INPUT, search = @Search, notNull = true,
                        inputType = @InputType
                )
        )
        private String book_name;

        @EruptField(
                views = @View(
                        title = "书本单价", sortable = true
                ),
                edit = @Edit(
                        title = "书本单价",
                        type = EditType.NUMBER, search = @Search, notNull = true,
                        numberType = @NumberType
                )
        )
        private Integer book_price;

        @EruptField(
                views = @View(
                        title = "图书上市时间", sortable = true
                ),
                edit = @Edit(
                        title = "图书上市时间",
                        type = EditType.DATE, search = @Search, notNull = true,
                        dateType = @DateType
                )
        )
        private Date book_date;

}